#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define BUF_SIZE 200

/**
 * echo "Once upon a time, there was..." | od -c
 */
int main() {
  FILE *write_fp;
  char buffer[BUF_SIZE + 1];
  memset(buffer, '\0', sizeof(buffer));

  sprintf(buffer, "Once upon a time, there was...");
  write_fp = popen("od -c", "w");
  if (write_fp != NULL) {
    fwrite(buffer, sizeof(char), strlen(buffer), write_fp);
    pclose(write_fp);
    exit(EXIT_SUCCESS);
  }

  exit(EXIT_FAILURE);
}
